import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_elf/model/home_list.dart';

import '../http_managers.dart';

class HomeService{

  //首页数据
  static Future<HomeListResponse> homeList(request,{State state}) {
    return _fetch<HomeListResponse>(Api.homeList, request,method: Method.GET,state: state);
  }


  static Future<T> _fetch<T>(String url,String request,{State state,String method}){
    return HttpManagers().netFetch<T>(url,request,fromType: 'HomeService',state: state,method: method);
  }
}